<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../styles/dpl-min.css" />
    <link rel="stylesheet" href="../styles/bui-min.css" />
    <link rel="stylesheet" href="../styles/main.css" />
</head>
<body>

<!--列表页-->
<div class="container">
    <form  id="searchForm" class="form-panel" action="post">
        <ul class="panel-content">
            <li>
                <span>
                  <label>LogId：</label><input type="text" class="control-text" name="pointLog.log_id"/>
                </span>
                <span>
                  <label>用户id：</label><input type="text" class="control-text" name="pointLog.user_id"/>
                </span>
                <span>
                  <label>规则id：</label><input type="text" class="control-text" name="pointLog.point_rule_id"/>
                </span>
                <span>
                  <label>创建时间：</label>
                    <input name="start_time" data-tip="{text : '起始日期'}" class="input-small calendar calendar-time" type="text"><label>&nbsp;-&nbsp;</label>
                    <input name="end_time"  class="input-small calendar calendar-time"  type="text">
                </span>
                <span>
                    <label>类型：</label>
                    <select name="pointLog.type">
                        <option value="">全部</option>
                        <option value="1">系统生成</option>
                        <option value="2">人工生成</option>
                    </select>
                </span>
                <button type="button" id="btnSearch" class="button button-primary">搜索</button>
            </li>
        </ul>
    </form>
    <div class="search-grid-container">
        <div id="grid"></div>
    </div>
</div>

<script type="text/javascript" src="../scripts/jquery/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="../scripts/bui.js"></script>
<script type="text/javascript" src="../scripts/common/search.js"></script>
<script type="text/javascript">
    var URI = "../clmp/pointLog", MODULE='pointLog';
    BUI.use(['common/search'], function (Search) {
        var columns = [
            {title: 'log_id', dataIndex: 'log_id', width: '10%'},
            {title: '用户id', dataIndex: 'user_id', width: '10%'},
            {title: '规则id', dataIndex: 'point_rule_id', width: '10%'},
            {title: '获得积分', dataIndex: 'point_num', width: '10%'},
            {title: '创建时间', dataIndex: 'create_time', width: '10%'},
            {title: '类型', dataIndex: 'type', width: '10%',renderer:function(value){
               return value==2?"客服生成":"系统生成";
            }},
            {title: '创建人', dataIndex: 'creater', width: '10%'},
            {title: '备注', dataIndex: 'remark', width: '10%'}
        ];
        var store = Search.createStore(URI, {totalProperty: 'total'});
        var gridCfg = Search.createGridCfg(columns, {
            emptyDataTpl : '<div style="padding: 20px" class="centered"><img src="../img/nodata.png"><h2>好像还没有数据</h2></div>'
        });

        var search = new Search({
            store: store,
            gridCfg: gridCfg
        });
    });
</script>
</body>
</html>